package quant.smart.crawl.cmd;

import java.util.Map;
import java.util.concurrent.Callable;
import java.util.concurrent.ConcurrentHashMap;

public abstract class BaseCommand implements Callable<Object>{

	protected Map<String, Object> parameters = new ConcurrentHashMap<String, Object>();
	protected ClientContext client;
		
	public BaseCommand(ClientContext client){
		this.client =client;
	}
	
	@Override
	public abstract Object call() throws Exception ;
	
	public void addParameter(String key,Object obj){
		parameters.put(key, obj);
	}

	public Map<String, Object> getParameters() {
		return parameters;
	}

	public void setParameters(Map<String, Object> parameters) {
		this.parameters = parameters;
	}
	
}
